home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 80 / CD Actual 80 Julio-Agosto 2003.iso / Linux / LinuxGazette / lg / issue17 / source / crosstile.sl < prev    next >
Encoding:
Text File  |  2002-08-14  |  786 b   |  37 lines

  1. /* crosstile.sl
  2.  *
  3.  * creates a single tile with a horizontal yellow bar crossing
  4.  * a vertical white bar on whatever the surface color is.
  5.  *
  6.  */
  7. #include "rmannotes.sl"
  8.  
  9. surface crosstile()
  10. {
  11.   color surface_color, layer_color;
  12.   color surface_opac, layer_opac;
  13.   float fuzz = 0.05;
  14.  
  15.   /* background layer */
  16.  
  17.   surface_color = Cs;
  18.   surface_opac = Os;
  19.  
  20.   /* vertical bar layer */
  21.  
  22.   layer_color = color (0.1, 0.5, 0.1);
  23.   layer_opac = pulse(0.35, 0.65, fuzz, s);
  24.   surface_color = blend(surface_color, layer_color, layer_opac);
  25.  
  26.   /* horizontal bar layer */
  27.  
  28.   layer_color = color (0.1, 0.1, 0.3);
  29.   layer_opac = pulse(0.35, 0.65, fuzz, t);
  30.   surface_color = blend(surface_color, layer_color, layer_opac);
  31.  
  32.   /* output */
  33.  
  34.   Oi = surface_opac;
  35.   Ci = surface_opac * surface_color;
  36. }
  37.